<template>
	<div>
		<table class="resourse-tea-table" cellpadding="0" cellspacing="0">
			<tr>
				<td class="td-name">{{$t('teachers.teacherNameLabel')}}：</td>
				<td>{{teacherInfo.name}}</td>
				<td class="td-name">{{$t('teachers.teacherCode')}}：</td>
				<td>{{teacherInfo.code}}</td>
			</tr>
			<tr>
				<td class="td-name">{{$t('teachers.company')}}：</td>
				<td>{{teacherInfo.company}}</td>
				<td class="td-name">{{$t('teachers.facultyLabel')}}：</td>
				<td>{{teacherInfo.facultyI18n}}</td>
			</tr>
			<tr>
				<td class="td-name">{{$t('teachers.teacherTypeLabel')}}：</td>
				<td>{{teacherInfo.teacherTypeI18n}}</td>
				<td class="td-name">{{$t('teachers.titleLabel')}}：</td>
				<td>{{teacherInfo.titleI18n?teacherInfo.titleI18n:teacherInfo.title}}</td>
			</tr>
			<tr>
				<td class="td-name">{{$t('teachers.nationalityLabel')}}：</td>
				<td>{{teacherInfo.countryI18n}}</td>
				<td class="td-name">{{$t('teachers.genderLabel')}}：</td>
				<td>{{teacherInfo.sexI18n}}</td>
			</tr>
			<tr>
				<td class="td-name">{{$t('teachers.phoneLabel')}}：</td>
				<td>{{teacherInfo.phone}}</td>
				<td class="td-name">{{$t('teachers.emailLabel')}}：</td>
				<td>{{teacherInfo.email}}</td>
			</tr>
			<tr v-if="this.global.projectId === '1' || outside">
        <td class="td-name">{{$t('teachers.card')}}：</td>
        <td>{{teacherInfo.cardLable}}</td>
        <td class="td-name">{{$t('teachers.underTeachQualLabel')}}：</td>
        <td v-if="'1' === teacherInfo.underTeachQual">{{('cn'!==$store.getters.language&&"Yes")||"是"}}</td>
        <td v-else>{{('cn'!==$store.getters.language&&"No")||"否"}}</td>
			</tr>
      <tr v-if="this.global.projectId === '2' && !outside">
        <td class="td-name">{{$t('teachers.card')}}：</td>
        <td>{{teacherInfo.cardLable}}</td>
        <td class="td-name">{{$t('teachers.postTeachQualLabel')}}：</td>
        <td v-if="'1' === teacherInfo.postTeachQual">{{('cn'!==$store.getters.language&&"Yes")||"是"}}</td>
        <td v-else>{{('cn'!==$store.getters.language&&"No")||"否"}}</td>
      </tr>
      <tr v-if="this.global.projectId === '4' && !outside">
        <td class="td-name">{{$t('teachers.card')}}：</td>
        <td>{{teacherInfo.cardLable}}</td>
        <td class="td-name">{{$t('teachers.postTeachQualOnjob')}}：</td>
        <td v-if="'1' === teacherInfo.postTeachQualOnjob">{{('cn'!==$store.getters.language&&"Yes")||"是"}}</td>
        <td v-else>{{('cn'!==$store.getters.language&&"No")||"否"}}</td>
      </tr>
      <tr v-if="outside">
        <td class="td-name">{{$t('teachers.postTeachQualLabel')}}：</td>
        <td v-if="'1' === teacherInfo.postTeachQual">{{('cn'!==$store.getters.language&&"Yes")||"是"}}</td>
        <td v-else>{{('cn'!==$store.getters.language&&"No")||"否"}}</td>
        <td class="td-name">{{$t('teachers.postTeachQualOnjob')}}：</td>
        <td v-if="'1' === teacherInfo.postTeachQualOnjob">{{('cn'!==$store.getters.language&&"Yes")||"是"}}</td>
        <td v-else>{{('cn'!==$store.getters.language&&"No")||"否"}}</td>
      </tr>
      <tr v-if="this.global.projectId === '1' && !outside">
        <td class="td-name">{{$t('teachers.teachQualValidity')}}：</td>
        <td colspan="3">{{teacherInfo.teachQualValidity}}</td>
      </tr>
      <tr  v-if="global.isGraduate && !outside">
        <td class="td-name">{{$t('teachers.teachQualReason')}}：</td>
        <td colspan="3" v-if="this.global.projectId === '2'">{{teacherInfo.teachQualReason}}</td>
        <td colspan="3" v-if="this.global.projectId === '4'">{{teacherInfo.teachQualOnjobReason}}</td>
      </tr>

			<!--<tr>
				<td class="td-name">{{$t('teachers.postTeachQualOnjob')}}：</td>
				<td
					colspan="3"
					v-if="'1' === teacherInfo.postTeachQualOnjob"
				>{{('cn'!==$store.getters.language&&"Yes")||"是"}}</td>
				<td colspan="3" v-else>{{('cn'!==$store.getters.language&&"No")||"否"}}</td>
			</tr>-->
			<tr v-if="outside">
				<td class="td-name">{{$t('teachers.startingTimeOfContract')}}：</td>
				<td>{{new Date(teacherInfo.employBegTime).toLocaleDateString()}}</td>
				<td class="td-name">{{$t('teachers.endingTimeOfContract')}}：</td>
				<td>{{new Date(teacherInfo.employEndTime).toLocaleDateString()}}</td>
			</tr>
			<tr>
				<td class="td-name">{{$t('teachers.addressLabel')}}：</td>
				<td colspan="3">{{teacherInfo.address}}</td>
			</tr>
      <tr>
        <td class="td-name">{{$t('teachers.createTimeLabel')}}：</td>
        <td colspan="3">{{teacherInfo.createTime}}</td>
      </tr>
			<tr>
				<td class="td-name">{{$t('teachers.updateTimeLabel')}}：</td>
				<td colspan="3">{{teacherInfo.updateTime}}</td>
			</tr>
			<tr>
				<td class="td-name">{{$t('teachers.introductionCn')}}：</td>
				<td colspan="3">{{teacherInfo.introductionCn}}</td>
			</tr>
			<tr>
				<td class="td-name" style="border-bottom: 1px solid #e7e8e8;">{{$t('teachers.introductionEn')}}：</td>
				<td colspan="3">{{teacherInfo.introductionEn}}</td>
			</tr>
		</table>
	</div>
</template>
<script>
import mixin from 'common/src/mixins/index';
export default {
	name: "DetailInfoComponent",
	mixins: [mixin],
	props: {
		teacherInfo: {
			type: Object
		},
		outside: {
			type: Boolean,
			default: false
		}
	},
	data() {
		return {
			//	teacherInfo: {}
		};
	},
	created() {
		//this.init();
	},
	mounted() {},
	computed: {},
	methods: {}
};
</script>

<style lang="scss" scoped>
.resourse-tea-table {
	text-align: left;
	width: 952px;
	border-color: #e7e8e8;
	border-style: solid;
	border-width: 0 1px 1px 0;
	td {
		font-family: PingFangSC-Regular;
		font-size: 14px;
		color: #2b3b4e;
		letter-spacing: 0;
		line-height: 16px;
		width: 365px;
		height: 40px;
		padding: 8px;
		border-color: #e7e8e8;
		border-style: solid;
		border-width: 1px 0 0 0;
	}
	.td-name {
		font-family: PingFangSC-Regular;
		font-size: 14px;
		color: #8896a7;
		text-align: right;
		line-height: 16px;
		width: 222px;
		height: 40px;
		background: #f9fbfc;
		padding: 0;
		border-color: #e7e8e8;
		border-style: solid;
		border-width: 1px 1px 0px 1px;
	}
}
</style>

